package com.yvon.maple.service.auth.service;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;

/**
 * @author : Yvon
 * @since : 2021-07-26
 */
public interface SecurityUserService extends UserDetailsService {
    /**
     * 通过手机号查询用户信息
     *
     * @param mobile 移动
     * @return {@link UserDetails }
     * @author : Yvon / 2021-09-02
     */
    UserDetails loadUserByMobile(String mobile);


    /**
     * 通过邮箱查询用户信息
     *
     * @param email 邮箱
     * @return {@link UserDetails }
     * @author : Yvon / 2021-09-02
     */
    UserDetails loadUserByEmail(String email);

    /**
     * 通过username查询Ldap用户信息
     *
     * @param username    用户名
     * @param credentials 凭证
     * @return UserDetails
     * @author : Yvon / 2022-02-25
     */
    UserDetails loadUserByLdap(String username, String credentials);

}
